package org.codeart.order.remote;

import org.codeart.common.response.TerminalResponse;
import org.codeart.common.response.TraceSearchResponse;
import org.codeart.common.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-map")
public interface ServiceMapClient {

    @GetMapping("/terminal/around-search")
    R<List<TerminalResponse>> aroundSearch(@RequestParam("center") String center,
                                           @RequestParam("radius") Integer radius);

    @PostMapping("/terminal/trace-search")
    R<TraceSearchResponse> traceSearch(@RequestParam("tid") String tid,
                                       @RequestParam("startTime") Long startTime,
                                       @RequestParam("endTime") Long endTime);


}
